/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gov.police.diary.dao.impl;

import gov.police.diary.dao.CustomHibernateDaoSupport;
import gov.police.diary.dao.HeadquaterDao;
import gov.police.diary.model.PolHeadquater;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author nmduc
 */
@Repository("HeadquaterDao")
@Transactional
public class HeadquaterDaoImpl extends CustomHibernateDaoSupport implements HeadquaterDao {

    public PolHeadquater getHeadquater(long id) {
        return getHibernateTemplate().get(PolHeadquater.class, id);
    }

    public void updateHeadquater(PolHeadquater headquater) {
        getHibernateTemplate().update(headquater);
    }

    public void saveHeadquater(PolHeadquater headquater) {
        getHibernateTemplate().save(headquater);
    }

    public void deleteHeadquater(PolHeadquater headquater) {
        getHibernateTemplate().delete(headquater);
    }
}
